//
//  UIDevice+SLCategory.m
//  Objective-C
//
//  Created by 陆承东 on 2019/2/14.
//  Copyright © 2019 S_Line. All rights reserved.
//

#import "UIDevice+SLCategory.h"

@implementation UIDevice (SLCategory)

+ (void)switchNewOrientation:(UIInterfaceOrientation)interfaceOrientation {
    
    NSNumber *resetOrientationTarget = [NSNumber numberWithInt:UIInterfaceOrientationUnknown];
    
    [[UIDevice currentDevice] setValue:resetOrientationTarget forKey:@"orientation"];
    
    NSNumber *orientationTarget = [NSNumber numberWithInt:interfaceOrientation];
    
    [[UIDevice currentDevice] setValue:orientationTarget forKey:@"orientation"];
    
}

@end
